# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libsm
pkgver=1.2.3
pkgrel=2
pkgdesc="X11 Session Management library"
arch=('x86_64')
license=('custom')
url="https://xorg.freedesktop.org/"
depends=('libice' 'util-linux-libs')
makedepends=('xorg-util-macros' 'xtrans' 'xorgproto')
source=(${url}/releases/individual/lib/libSM-${pkgver}.tar.bz2)
sha512sums=('74c42e27029db78475e62025b4711dbac5e22d2f8e8a24be98a1c31b03c0fc4afe859928f851800ea0b76854f12147900dc4f27bbfd3d8ea45daaaf24b70a903')

build() {
  cd libSM-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd libSM-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
